package miningMindsUtil;

import java.util.HashMap;
import java.util.Map;
import java.util.Map.Entry;

import parameter.Path;
import functions.FileFunction;

public class ModifyFileContents {
	public static void main(String args[]){
		
		String sourcePath = Path.WIKIMAP_WIKILOG_FILEPATH; // It should be .txt file
		String targetPath = Path.WIKIMAP_WIKILOG_FILEPATH; // It should be .txt file
		
		Map<String, String> map = FileFunction.readMapStrStr(sourcePath);
		Map<String, String> map2 = new HashMap<String, String>();
		
		for (Entry<String, String> entry : map.entrySet()) {
			String key = entry.getKey();
			String value = entry.getValue();
			//////------MODIFICATION PROCESS--------////////
			
			map2.put(key, value);
			////////////////////////////////////////////////
		}
		
		FileFunction.writeMapStrStr(map2, targetPath);
		System.out.println("complete");
	}
}
